filePath:`:/home/data/kdb/config/process.csv;
tb: ("ssss"; enlist ",") 0:filePath;
dblist:distinct (24 _ tb[`proctype] except `FuturesShge`);

DTabel:raze{    
GW: `:192.168.1.44:9000:user1:password;
h:hopen GW;
(neg h) ".gw.asyncexec[\"system \\\"a\\\"\";`",(string x),"]"; res1:h(::);
hclose h;
([] db:enlist x;tbl:enlist (res1 except (`heartbeat`logmsg`)))
}each dblist;


DFunction:raze{    
GW: `:192.168.1.44:9000:user1:password;
h:hopen GW;
(neg h) ".gw.asyncexec[\"system \\\"f\\\"\";`",(string x),"]"; res1:h(::);
hclose h;
([] db:enlist x;tbl:enlist (res1 except (`heartbeat`logmsg`)))
}each dblist;


GetFunctionDefine:{
    [func;db]
    GW: `:192.168.1.41:9000:user1:password;
    h:hopen GW;
    (neg h) (`.gw.asyncexec;func; db);res:h(::);
    hclose h;
    res
   }

GetFunctionDefine[`GetModelSetting;`ModelSetting]






GW: `:192.168.1.41:9000:user1:password;
h:hopen GW;
(neg h) ".gw.asyncexec[\"GetFeeRateData[2016.11.18;0]\"; `FeeRateDB]"; res12:h(::);
hclose h;

GW: `:192.168.1.41:9000:user1:password;
h:hopen GW;
(neg h) ".gw.asyncexec[(`GetFeeRateData;2016.11.08;0);`FeeRateDB]"; res9:h(::);
hclose h;

GW: `:192.168.1.41:9000:user1:password;
h:hopen GW;
(neg h) (`.gw.asyncexec;(`GetFeeRateData;2016.11.08;0); `FeeRateDB);res12:h(::);
hclose h;


GW: `:192.168.1.44:9000:user1:password;
h:hopen GW;
(neg h) ".gw.asyncexec[\"select from FeeRate where date=last date \"; `FeeRateDB]"; res2:h(::);
hclose h;

GW: `:192.168.1.44:9000:user1:password;
h:hopen GW;
(neg h) (`.gw.asyncexec;"select from FeeRate where date=last date"; `FeeRateDB); res:h(::);
hclose h;



GW: `:192.168.1.41:9000:user1:password;
h:hopen GW;
(neg h) ".gw.asyncexec[(`GetDataBySymbolDate;`CffexDepth;2016.06.28;`t1609;`CffexDepthStructure;(0;-1));`FuturesCffex]"; res9:h(::);
hclose h;

GW: `:192.168.1.44:9000:user1:password;
h:hopen GW;
(neg h) ".gw.asyncexec[(`GetDataBySymbolDateTime;`ShfeDepth;2015.08.05;`cu1606;();`ShfeDepthStructure;(0;-1));`FuturesShfe]";res9:h(::);
hclose h;

GW: `:192.168.1.41:9000:user1:password;
h:hopen GW;
(neg h) ".gw.asyncexec[(`GetUnionDataBySymbolDate;`DceDepth;2016.06.03;`m1609;`DceDepthStructure;(0;-1));`FuturesDce]"; res2:h(::);
hclose h;

GW: `:192.168.1.41:9000:user1:password;
h:hopen GW;
(neg h) ".gw.asyncexec[(`GetByteBySymbolCategoryDateTime;`DceDepth;();2016.06.03;();`m1609;();`DceDepthStructure;(0;-1));`FuturesDce]"; res2:h(::);
hclose h;







